<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/adoms/orderLine/list" method="post">
	<input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}" />
	<input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}" />
	<input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}" />
	<table class="table table-striped table-bordered table-condensed">
		<tr align="center">
			<c:if test="${order == null }">
				<th>
					订单编号
					<y:search fieldType="S" fieldList="order.code" matchType="LIKE" className="input-medium search-query" />
					<button class="btn btn-small" onclick="search()" type="button">
						<i class="icon-search"></i>
						搜索
					</button>
			</c:if>
			</th>
			<c:if test="${order != null }">
				<td>
					订单编号：${order.code } - 订购的商品详情
					<input class="btn btn-info right" type="button" value="返 回" back="back" />
				</td>
			</c:if>
		</tr>
	</table>
</form>
<table class="table table-striped table-bordered table-condensed" id="dataList">
	<thead>
		<tr id="theader">
			<th>#</th>
			<th>
				<a href="javascript:sort('order')">订单编号</a>
			</th>
			<th>
				<a href="javascript:sort('order')">收货部门</a>
			</th>
			<th>
				<a href="javascript:sort('marchandise')">商品</a>
			</th>
			<th>
				<a href="javascript:sort('marchandise')">单价(元)</a>
			</th>
			<th>
				<a href="javascript:sort('marchandise')">规格</a>
			</th>
			<th>
				<a href="javascript:sort('boxNum')">件数</a>
			</th>
			<!-- 			<th> -->
			<!-- 				<a href="javascript:sort('items')">零散</a> -->
			<!-- 			</th> -->
			<th width="65">
				<a href="javascript:sort('items')">总数量</a>
			</th>
			<th>
				<a href="javascript:sort('marchandise')">单位</a>
			</th>
			<th>
				<a href="javascript:sort('totalPrice')">合计(元)</a>
			</th>
			<th class="showed hide">
				<a>操作</a>
			</th>
			<th class="hasIn hide">
				<a href="javascript:sort('hasIn')">已录入数</a>
			</th>
			<th>
				<a href="javascript:sort('insertTime')">下单时间</a>
			</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="entity" items="${pageData.result}" varStatus="index">
			<tr id="mg${entity.marchandise.id }" <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
				<td mId="${entity.marchandise.id }">${index.index + 1}</td>
				<td>${entity.order.code}</td>
				<td>${entity.order.department.name}</td>
				<td mName="${entity.marchandise.name}">${entity.marchandise.name}</td>
				<td>${entity.marchandise.price}</td>
				<td>${entity.marchandise.spcification}</td>
				<td>${entity.boxNum}</td>
				<%-- 				<td>${entity.items}</td> --%>
				<td mOrderNum="${entity.items}">
					<span class="tRed" itemsNum>
						<fmt:formatNumber value="${entity.items}" pattern="###,###.##"></fmt:formatNumber>
					</span>
					(${entity.marchandise.packageing})
				</td>
				<td mPackage="${entity.marchandise.packageing}">${entity.marchandise.packageing}</td>
				<td class="tRed">
					<fmt:formatNumber value="${entity.totalPrice}" pattern="###,###.##"></fmt:formatNumber>
				</td>
				<td class="showed hide">
					<a deny="not" href="${ctx}/adoms/orderLine/edit/${entity.id}">修改数量</a>
				</td>
				<td class="hasIn hide">${entity.hasIn }</td>
				<td>
					<fmt:formatDate value="${entity.insertTime}" pattern="yyyy-MM-dd HH:mm:ss" />
				</td>
			</tr>
		</c:forEach>
	</tbody>
</table>
<c:if test="${order == null }">
	<%@ include file="/WEB-INF/jsp/commons/pager.jsp"%>
</c:if>